]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[dash] Move BackLink to CSS
authorColin Walters <walters@verbum.org>
Tue, 10 Nov 2009 15:02:02 +0000 (10:02 -0500)
committerColin Walters <walters@verbum.org>
Thu, 12 Nov 2009 16:21:20 +0000 (11:21 -0500)
The previous commit 626f679947298a99 broke the back links on
search drilldown.

https://bugzilla.gnome.org/show_bug.cgi?id=601413

data/Makefile.am
data/back.svg [deleted file]
data/theme/gnome-shell.css
data/theme/section-back.svg [new file with mode: 0644]
js/ui/dash.js

index 06827d0b3012e1467d9eeafacb34596303b817e0..8c090c08f27d91ca8860b5666ed71cc867496c79 100644 (file)
@@ -16,7 +16,6 @@ imagesdir = $(pkgdatadir)/images
 dist_images_DATA =                             \
        add-workspace.svg                       \
        app-well-glow.png                       \
-       back.svg                                \
        close.svg                               \
        close-black.svg                         \
        info.svg                                \
@@ -30,7 +29,8 @@ dist_theme_DATA =                             \
        theme/scroll-button-down-hover.png      \
        theme/scroll-button-up.png              \
        theme/scroll-button-up-hover.png        \
-       theme/scroll-vhandle.png
+       theme/scroll-vhandle.png        \
+       theme/section-back.svg
 
 schemadir  = @GCONF_SCHEMA_FILE_DIR@
 schema_DATA = gnome-shell.schemas
diff --git a/data/back.svg b/data/back.svg
deleted file mode 100644 (file)
index 0346530..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" id="Foreground" x="0px" y="0px" width="12" height="16" viewBox="0 0 12 16" enable-background="new 0 0 29 18" xml:space="preserve" sodipodi:version="0.32" inkscape:version="0.46+devel" sodipodi:docname="back.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs14"><inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 9 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="29 : 9 : 1" inkscape:persp3d-origin="14.5 : 6 : 1" id="perspective18"/></defs><sodipodi:namedview inkscape:window-height="728" inkscape:window-width="1103" inkscape:pageshadow="2" inkscape:pageopacity="1" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#000000" id="base" showgrid="true" inkscape:zoom="27.260185" inkscape:cx="12.592456" inkscape:cy="8.2696842" inkscape:window-x="145" inkscape:window-y="38" inkscape:current-layer="Foreground" inkscape:snap-global="true" showguides="false"><inkscape:grid type="xygrid" id="grid2391" empspacing="5" visible="true" enabled="true" snapvisiblegridlinesonly="true"/></sodipodi:namedview>
-
-
-
-<path style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none;" d="M 10,2 10,14 2,8 10,2 z" id="path43"/></svg>
\ No newline at end of file
index 86ec44b8432010619123de9434e5c7b194b63282..a01d1eaf0130027cfd3459e70411f7a642259a26 100644 (file)
@@ -101,12 +101,24 @@ StScrollBar StButton#vhandle:hover
 .section-header-inner {
     border: 1px solid #000000;
     padding: 0px 4px;
+    spacing: 4px;
 }
 
 .section-text-content {
     padding: 4px 0px;
 }
 
+.section-header-back {
+    padding: 0px 4px 0px 0px;
+    border-right: 1px solid #262626;
+}
+
+.section-header-back-image {
+    background-image: url("section-back.svg");
+    width: 12px;
+    height: 16px;
+}
+
 .section-count {
 }
 
diff --git a/data/theme/section-back.svg b/data/theme/section-back.svg
new file mode 100644 (file)
index 0000000..0346530
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" id="Foreground" x="0px" y="0px" width="12" height="16" viewBox="0 0 12 16" enable-background="new 0 0 29 18" xml:space="preserve" sodipodi:version="0.32" inkscape:version="0.46+devel" sodipodi:docname="back.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs14"><inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 9 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="29 : 9 : 1" inkscape:persp3d-origin="14.5 : 6 : 1" id="perspective18"/></defs><sodipodi:namedview inkscape:window-height="728" inkscape:window-width="1103" inkscape:pageshadow="2" inkscape:pageopacity="1" guidetolerance="10.0" gridtolerance="10.0" objecttolerance="10.0" borderopacity="1.0" bordercolor="#666666" pagecolor="#000000" id="base" showgrid="true" inkscape:zoom="27.260185" inkscape:cx="12.592456" inkscape:cy="8.2696842" inkscape:window-x="145" inkscape:window-y="38" inkscape:current-layer="Foreground" inkscape:snap-global="true" showguides="false"><inkscape:grid type="xygrid" id="grid2391" empspacing="5" visible="true" enabled="true" snapvisiblegridlinesonly="true"/></sodipodi:namedview>
+
+
+
+<path style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: none;" d="M 10,2 10,14 2,8 10,2 z" id="path43"/></svg>
\ No newline at end of file
index 823a15d819f2058ac519e3d332e4eaa823aaecf1..fe7a4dafb00c8c8f5d49fcc07f0eec74eed44f45 100644 (file)
@@ -403,21 +403,9 @@ function BackLink() {
 
 BackLink.prototype = {
     _init : function () {
-        this.actor = new Shell.ButtonBox({ orientation: Big.BoxOrientation.HORIZONTAL,
-                                           padding_right: DEFAULT_PADDING,
-                                           padding_left: DEFAULT_PADDING,
-                                           reactive: true,
-                                           x_align: Big.BoxAlignment.CENTER,
-                                           y_align: Big.BoxAlignment.CENTER,
-                                           border_right: SECTION_BORDER,
-                                           border_color: SECTION_BORDER_COLOR });
-
-        let backIconUri = "file://" + global.imagedir + "back.svg";
-        let backIcon = Shell.TextureCache.get_default().load_uri_sync(Shell.TextureCachePolicy.FOREVER,
-                                                                      backIconUri,
-                                                                      12,
-                                                                      16);
-        this.actor.append(backIcon, Big.BoxPackFlags.NONE);
+        this.actor = new St.Button({ style_class: "section-header-back",
+                                      reactive: true });
+        this.actor.set_child(new St.Bin({ style_class: "section-header-back-image" }));
     }
 }
 
@@ -442,13 +430,20 @@ SectionHeader.prototype = {
             this._onStyleChanged();
         }));
 
+        this.backLink = new BackLink();
+        this._innerBox.add(this.backLink.actor);
+        this.backLink.actor.hide();
+        this.backLink.actor.connect('clicked', Lang.bind(this, function (actor) {
+            this.emit('back-link-activated');
+        }));
+
         let textBox = new St.BoxLayout({ style_class: "section-text-content" });
         this.text = new St.Label({ style_class: "section-title",
                                    text: title });
         textBox.add(this.text, { x_align: St.Align.START });
 
         this.countText = new St.Label({ style_class: "section-count" });
-        textBox.add(this.countText, { x_align: St.Align.END });
+        textBox.add(this.countText, { expand: true, x_fill: false, x_align: St.Align.END });
         this.countText.hide();
 
         this._innerBox.add(textBox, { expand: true });